<%@page import="POJO.ProductInCar"%>
<%@page import="POJO.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<script type="text/javascript">	</script>
<style type="text/css">
	.head{
		background-color: white;
		color: darkgrey;
		padding: 5px;
		font-size: 20px;
		margin:5px 0 0 125px;
		width: 1100px;
	}

</style>
</head>
<% 
	Object username = session.getAttribute("name");
	boolean userLogin = false;
	if (username != null) {
		userLogin = true;
	}
	 %>
	 
	
<body>

	<% if (userLogin) {
		ProductInCar pic = new ProductInCar();	
	%>
	 
	<div class="head">
		<table>
		<tr>
		<td width="100px"><%=username %></td>
		<td width="100px"><a href="car.jsp">购物车(<span><%=session.getAttribute("num") %></span>)</a></td>
		<td width="100px"><a href="order.jsp">我的订单</a></td>
		</tr>
		</table>
	</div>
	<%} else {%> 
	<div class="head">
	<table>
	<tr>
	<td width="70px"><a href="login.jsp">登陆</a></td>
	<td width="70px"><a href="register.jsp">注册</a></td>
	</tr>
	</table>
</div>
<%} %>
</body>
</html>